/***************************************************************************
*   Copyright (C) 2008 by Eduardo Gurgel Pinho                            *
*   edgurgel@gmail.com                                                    *
*                                                                         *
*   This program is free software; you can redistribute it and/or modify  *
*   it under the terms of the GNU General Public License as published by  *
*   the Free Software Foundation; either version 3 of the License, or     *
*   (at your option) any later version.                                   *
*                                                                         *
*   This program is distributed in the hope that it will be useful,       *
*   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
*   GNU General Public License for more details.                          *
*                                                                         *
*   You should have received a copy of the GNU General Public License     *
*   along with this program; if not, write to the                         *
*   Free Software Foundation, Inc.,                                       *
*   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
***************************************************************************/

#include "color_material.h"

namespace Sirat {

namespace Material {

Color_Material::Color_Material(const Common::Color& _ambient,const Common::Color& _diffuse,const Common::Color& _specular, const Common::Color& _reflectiveness,const double _brightness) : Object_Material(Color_Material_Type) , ambient(_ambient), diffuse(_diffuse), specular(_specular), reflectiveness(_reflectiveness) , brightness(_brightness) { }

Color_Material::Color_Material() : Object_Material(Color_Material_Type), ambient(Common::Color(1.0,1.0,1.0)) , diffuse(Common::Color(1.0,1.0,1.0)) , specular(Common::Color(1.0,1.0,1.0)), reflectiveness(Common::Color(0.0,0.0,0.0)) , brightness(1.0) , refractive_index(0.0) { }

Color_Material::Color_Material(const Color_Material& _material) : Object_Material(_material) {
	ambient = _material.ambient;
	diffuse = _material.diffuse;
	specular = _material.specular;
	reflectiveness = _material.reflectiveness;
}

Color_Material::~Color_Material() { }

Common::Color Color_Material::get_ambient() const { return ambient; }

Common::Color Color_Material::get_diffuse() const { return diffuse; }

Common::Color Color_Material::get_specular() const { return specular; }

Common::Color Color_Material::get_reflectiveness() const { return reflectiveness; }

double Color_Material::get_brightness() const { return brightness; }

double Color_Material::get_refractive_index() const { return refractive_index; }

void Color_Material::set_ambient(const Common::Color& _ambient) { ambient = _ambient; }

void Color_Material::set_diffuse(const Common::Color& _diffuse) { diffuse = _diffuse; }

void Color_Material::set_specular(const Common::Color& _specular) { specular = _specular; }

void Color_Material::set_reflectiveness(const Common::Color& _reflectiveness) { reflectiveness = _reflectiveness; }

void Color_Material::set_brightness(const double _brightness) { brightness = _brightness; }

void Color_Material::set_refractive_index(const double _refractive_index) { refractive_index = _refractive_index; }

Color_Material& Color_Material::operator=(const Color_Material& _color_material) {
	if(this != &_color_material) {
		Object_Material::operator=(_color_material);
		ambient = _color_material.ambient;
		diffuse = _color_material.diffuse;
		specular = _color_material.specular;
		reflectiveness = _color_material.reflectiveness;
	}
	return *this;
}

}

}
